/**
 * Copyright (C) 2016 Juno Inc., All Rights Reserved.
 */
package com.jyl.designPattern.structure.proxy;

import java.net.URL;

/**
 *
 * @author Long, E-mail:jyl0401@163.com
 * @date 2019年4月20日 下午5:31:46
 */
public class HighResolutionImage implements Image{
	
	private URL imageURL;
	private int width;
	private int high;
	private long startTime;

	public HighResolutionImage(URL imageURL){
		this.imageURL = imageURL;
		this.width = 600;
		this.high = 600;
		this.startTime = System.currentTimeMillis();
	}
	
	public boolean isLoad(){
		
		long endTime = System.currentTimeMillis();
		return endTime-startTime>3000;
	}

	public void showImage() {
		System.out.println("Real Image "+imageURL);
	}

	public URL getImageURL() {
		return imageURL;
	}

	public int getWidth() {
		return width;
	}

	public int getHigh() {
		return high;
	}
}
